package main

import (
	"fmt"
	"os"
	"strings"

	"gitee.com/rocket049/mycrypto"
	"github.com/howeyc/gopass"
)

func main() {
	if len(os.Args) != 3 {
		panic("Error args")
	}
	var pwd string
	fmt.Println("Password:")
	p1, _ := gopass.GetPasswd()
	pwd = string(p1)
	pwd = strings.TrimSpace(pwd)
	err := mycrypto.CfbEncryptoToFile(os.Args[1], os.Args[2], pwd)
	if err != nil {
		panic(err)
	}
	fmt.Println("AES Encrypt successful.")
}
